/** ###################################################################
**     Filename  : lcd_gui.c
**     Project   : ccd2
**     Processor : MCF52255CAF80
**     Version   : Driver 01.00
**     Compiler  : CodeWarrior MCF C Compiler
**     Arthor	 : Yumi Chan, Cindy Yu, Ryan Cheung
**     Abstract  :
**         
**     Settings  :
**     Contents  :
**         No public methods
**
** ###################################################################*/


#ifndef __LCD_GUI_H_
#define __LCD_GUI_H_

/* Include */
#include <math.h>
#include "CCD_threshold.h"
#include "CCD2_threshold.h"
#include "joystick_up.h"
#include "joystick_down.h"
#include "joystick_left.h"
#include "joystick_right.h"
#include "joystick_centre.h"
#include "lcd.h"


/* Private Define */
#define		LINE_HEIGHT		16


/* Private typedef*/
typedef enum GUI_PAGE 
{
	MENU,
	CCD_SETTING,
	SPEED_PID,
	SERVO_PID
} GUI_PAGE;


/* Variables */
extern volatile uint16 time_ms;
extern float a;
extern float b;
extern float kp_for_small_error;
extern short error_threshold;
extern uint16 straightRoad_threshold;


/* Private Method Declaration */
void LCD_GUI(GUI_PAGE);
void intToString(int num, char* str, uint8_t index);
void clearString(char*, uint32);
void GUI_PrintMenu(uint8);
void GUI_PrintCCDSetting(uint8);
void GUI_PrintSpeedPID(uint8);
void GUI_PrintServoPID(uint8);

#endif
